package com.sikaryofficial.backend.domain.vo.export;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.sikaryofficial.backend.service.brand.export.PrizeLevelStringConverter;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

import static com.sikaryofficial.backend.constant.ProductConstant.CONTENT_QR_CODE_ROW_HEIGHT;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ExcelIgnoreUnannotated
@ContentRowHeight(CONTENT_QR_CODE_ROW_HEIGHT)
public class WinnerExportVO {

    @ExcelIgnore
    private Long activityResultId;

    @ColumnWidth(25)
    @ExcelProperty(value = "注册邮箱", index = 0)
    private String email;

    @ColumnWidth(25)
    @ExcelProperty(value = "创建人ID", index = 1, converter = LongStringConverter.class)
    private Long createdBy;

    @ColumnWidth(25)
    @ExcelProperty(value = "创建时间", index = 2)
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ColumnWidth(25)
    @ExcelProperty(value = "昵称", index = 3)
    private String nickName;

    @ColumnWidth(25)
    @ExcelProperty(value = "礼品名称", index = 4)
    private String prizeName;

    @ColumnWidth(25)
    @ExcelProperty(value = "活动Id", index = 5, converter = LongStringConverter.class)
    private Long activityId;

    @ColumnWidth(25)
    @ExcelProperty(value = "礼品Id", index = 6, converter = LongStringConverter.class)
    private Long prizeId;

    @ColumnWidth(25)
    @ExcelProperty(value = "奖项名称", index = 7)
    private String labelName;

    @ColumnWidth(25)
    @ExcelProperty(value = "奖项等级", index = 8, converter = PrizeLevelStringConverter.class)
    private Integer level;

    @ColumnWidth(25)
    @ExcelProperty(value = "发货信息邮箱", index = 9)
    private String deliveryEmail;

    @ColumnWidth(25)
    @ExcelProperty(value = "支付账号", index = 10)
    private String paymentAccount;

    @ColumnWidth(25)
    @ExcelProperty(value = "收货地址", index = 11)
    private String addressDetailObj;

}
